//actionCreator其实是一个工厂函数,复用这个函数返回一个action对象
import { Iaction } from './todoReducer';

let actionCreator = (type: Iaction['type'], payload?: any): Iaction => {
    return {
        type,
        payload
    }
}


export default actionCreator